<?php
$sMissiongroups = JobHandler::getMissiongroups($_SESSION['iJobID']);
$oJobConfig = JobHandler::getConfig($_SESSION['iJobID']);
$oIssues = IssueHandler::getIssues($_SESSION['iJobID']);
?>
<div id="layer_issue_accept" class="hidden" style="visibility: visible;">
<form action="index.php" method="post" name="form_issue_accept">
<input type="hidden" name="sAction" value="issue-accept">
<input type="hidden" name="sView" value="job-view">
<input type="hidden" name="iIssue" value="<?php print $_REQUEST['iIssue'] ?>">
<input type="hidden" name="iJob" value="<?php print $_SESSION['iJobID'] ?>">
<table class="boxborder" cellspacing="0">
	<tr>
		<td class="boxhandle" colspan="2"><?php print msg('Process issue') ?></td>
	</tr>
	<tr>
		<td class="boxbody" colspan="2">
			<textarea name="sBody" cols="60" rows="15" readonly><?php print $oIssues[$_REQUEST['iIssue']]->sBody ?></textarea>
		</td>
	</tr>
	<tr>
		<td class="fieldname"><?php print msg('Task') ?>:</td>
		<td class="fieldvalue"><input type="text" name="sTodo" size="40" id="focus_issue_accept"></td>
	</tr>
	<tr>
		<td class="boxbody center" colspan="2">
			<?php print msg('Notice: If "Task:" is empty, the task<br>is created with the issue\'s original text.') ?>
		</td>
	</tr>
<?php
if (count($sMissiongroups) > 0) {
	?>
	<tr>
		<td class="fieldname"><?php print msg('Taskgroup') ?>:</td>
		<td class="fieldvalue">
			<select name="iMissiongroup">
<?php
if ($oJobConfig['bAllowNogroupMissions']) {
	print '<option value="0">[ '.msg('None').' ]</option>';
}
foreach ($sMissiongroups as $iID => $sThisMissiongroup) {
	print '<option value="'.$iID.'">'.$sThisMissiongroup.'</option>';
}
?>
			</select>
		</td>
	</tr>
	<?php
}
?>
	<tr>
		<td class="boxbody center" colspan="2">
			<input type="submit" value="<?php print msg('OK') ?>">
			<input type="button" value="<?php print msg('Cancel') ?>" onClick="layerHide('layer_issue_accept');">
		</td>
	</tr>
</table>
</form>
</div>
